// 采购退货 接口

import request from '@/utils/request'

//采购退货 列表
export function GetListAPI(params) {
  return request({
    url: '/storage/pickingPurchase/list',
    method: 'GET',
    params
  })
}

// 采购退货 新增
export function AddDataAPI(data) {
  return request({
    url: '/storage/pickingPurchase/addPurchase',
    method: 'POST',
    data
  })
}

//采购退货 提交
export function SubmitAPI(data) {
  return request({
    url: '/storage/pickingPurchase/submitPurchase',
    method: 'POST',
    data
  })
}

//采购退货 审核
export function PurchaseOrderReviewAPI(data) {
  return request({
    url: '/storage/pickingPurchase/purchaseReview',
    method: 'PUT',
    data
  })
}

//采购退货 查看
export function GetDailtAPI(data) {
  return request({
    url: '/storage/pickingPurchase/view/' + data,
    method: 'GET'
  })
}

// 采购退货 关结
export function CloseAPI(data) {
  return request({
    url: '/storage/pickingPurchase/closePurchase',
    method: 'POST',
    data
  })
}

// 采购退货 修改
export function EditDataAPI(data) {
  return request({
    url: '/storage/pickingPurchase/updatePurchase',
    method: 'POST',
    data
  })
}

// 采购退货 删除
export function DelDataAPI(data) {
  return request({
    url: '/storage/pickingPurchase/deletePurchase/' + data,
    method: 'DELETE'
  })
}

// 采购退货明细列表查询
export function GetDetailListAPI(params) {
  return request({
    url: '/storage/pickingPurchaseDetail/list',
    method: 'GET',
    params
  })
}

// 采购入库列表
export function GetShopPingListAPI(params) {
  return request({
    url: '/storage/purchase-receipt/list',
    method: 'GET',
    params
  })
}

// 查询采购入库单对应仓库等级为批退的产品列表
export function GetPurchaseAPI(params) {
  return request({
    url: '/storage/wmsStock/getPurchase',
    method: 'GET',
    params
  })
}

// 金蝶数据推送
export function pushAPI(data) {
  return request({
    url: '/storage/pickingPurchase/push',
    method: 'PUT',
    data
  })
}
